﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ProgressBarTest="clr-namespace:ProgressBarTest">
	<!-- Resource dictionary entries should be defined here. -->
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="BarbedWireProgressBarStyle"
		TargetType="{x:Type ProgressBarTest:CircularProgressBar}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ProgressBarTest:CircularProgressBar}">
					<Grid SnapsToDevicePixels="true"
						DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ProgressBarTest:CircularProgressBar}}}">
						<Path>
							<Path.Fill>
								<RadialGradientBrush>
									<GradientStop Color="#FFBABABA" Offset=".87"/>
									<GradientStop Color="#FFC7C7C7" Offset="0.94"/>
									<GradientStop Color="#FFBABABA" Offset="1"/>
								</RadialGradientBrush>
							</Path.Fill>
							<Path.Data>
								<CombinedGeometry GeometryCombineMode="Union">
									<CombinedGeometry.Geometry1>
										<PathGeometry>
											<PathFigure StartPoint="75,0">
												<LineSegment Point="146.3,51.8" />
												<LineSegment Point="119.1,135.7" />
												<LineSegment Point="30.9,135.7" />
												<LineSegment Point="3.7, 51.8" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<CombinedGeometry GeometryCombineMode="Exclude">
											<CombinedGeometry.Geometry1>
												<EllipseGeometry Center="75,75" RadiusX="75" RadiusY="75" />
											</CombinedGeometry.Geometry1>
											<CombinedGeometry.Geometry2>
												<EllipseGeometry Center="75,75" RadiusX="70" RadiusY="70" />
											</CombinedGeometry.Geometry2>
										</CombinedGeometry>
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Path.Data>
							<Path.Clip>
								<CombinedGeometry GeometryCombineMode="Exclude">
									<CombinedGeometry.Geometry1>
										<EllipseGeometry Center="75,75" RadiusX="74" RadiusY="74" />
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<EllipseGeometry Center="75,75" RadiusX="66" RadiusY="66" />
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Path.Clip>
						</Path>
						<Path Fill="#FF01D328">
							<Path.Data>
								<CombinedGeometry GeometryCombineMode="Intersect">
									<CombinedGeometry.Geometry1>
										<PathGeometry>
											<PathFigure StartPoint="0,0">
												<LineSegment Point="0,75" />
												<LineSegment Point="75,75" />
												<LineSegment Point="{Binding ProgressPoint}" />
												<LineSegment Point="{Binding ThirdBoundingPoint}" />
												<LineSegment Point="{Binding SecondBoundingPoint}" />
												<LineSegment Point="{Binding FirstBoundingPoint}" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<CombinedGeometry GeometryCombineMode="Union">
											<CombinedGeometry.Geometry1>
												<PathGeometry>
													<PathFigure StartPoint="75,0">
														<LineSegment Point="146.3,51.8" />
														<LineSegment Point="119.1,135.7" />
														<LineSegment Point="30.9,135.7" />
														<LineSegment Point="3.7, 51.8" />
													</PathFigure>
												</PathGeometry>
											</CombinedGeometry.Geometry1>
											<CombinedGeometry.Geometry2>
												<CombinedGeometry GeometryCombineMode="Exclude">
													<CombinedGeometry.Geometry1>
														<EllipseGeometry Center="75,75" RadiusX="75" RadiusY="75" />
													</CombinedGeometry.Geometry1>
													<CombinedGeometry.Geometry2>
														<EllipseGeometry Center="75,75" RadiusX="70" RadiusY="70" />
													</CombinedGeometry.Geometry2>
												</CombinedGeometry>
											</CombinedGeometry.Geometry2>
										</CombinedGeometry>
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Path.Data>
							<Path.Clip>
								<CombinedGeometry GeometryCombineMode="Exclude">
									<CombinedGeometry.Geometry1>
										<EllipseGeometry Center="75,75" RadiusX="74" RadiusY="74" />
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<EllipseGeometry Center="75,75" RadiusX="66" RadiusY="66" />
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Path.Clip>
						</Path>
						<Ellipse>
							<Ellipse.Fill>
								<RadialGradientBrush>
									<GradientStop Color="#00FFFFFF" Offset="0.949"/>
									<GradientStop Color="#66FFFFFF" Offset="0.95"/>
									<!--
                        			<GradientStop Color="#FF202020" Offset=".87"/>
                        			<GradientStop Color="#FF747474" Offset=".9"/>
									<GradientStop Color="#FF747474" Offset=".97"/>
									<GradientStop Color="#FF202020" Offset="1"/>
									-->
								</RadialGradientBrush>
							</Ellipse.Fill>
							<Ellipse.Clip>
								<CombinedGeometry GeometryCombineMode="Exclude">
									<CombinedGeometry.Geometry1>
										<EllipseGeometry Center="75,75" RadiusX="75" RadiusY="75" />
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<EllipseGeometry Center="75,75" RadiusX="65" RadiusY="65" />
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Ellipse.Clip>
						</Ellipse>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsIndeterminate"
							Value="true" />
						<Trigger Property="IsIndeterminate"
							Value="false" />
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>